

<!DOCTYPE html>
<html class="writer-html5" lang="en" data-content_root="./">
<head>
  <meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />

  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Test of CodeCarbon on Scaleway hardware &mdash; CodeCarbon 3.1.1 documentation</title>
      <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=03e43079" />
      <link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=e59714d7" />

  
      <script src="_static/jquery.js?v=5d32c60e"></script>
      <script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
      <script src="_static/documentation_options.js?v=796a81b5"></script>
      <script src="_static/doctools.js?v=9bcbadda"></script>
      <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
    <script src="_static/js/theme.js"></script>
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" /> 
</head>

<body class="wy-body-for-nav"> 
  <div class="wy-grid-for-nav">
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >

          
          
          <a href="index.html" class="icon icon-home">
            CodeCarbon
          </a>
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>
        </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
              <p class="caption" role="heading"><span class="caption-text">Introduction</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="motivation.html">Motivation</a></li>
<li class="toctree-l1"><a class="reference internal" href="methodology.html">Methodology</a></li>
<li class="toctree-l1"><a class="reference internal" href="rapl.html">RAPL Metrics</a></li>
<li class="toctree-l1"><a class="reference internal" href="model_examples.html">Model Comparisons</a></li>
<li class="toctree-l1"><a class="reference internal" href="faq.html">Frequently Asked Questions</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Getting Started</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installing CodeCarbon</a></li>
<li class="toctree-l1"><a class="reference internal" href="usage.html">Quickstart</a></li>
<li class="toctree-l1"><a class="reference internal" href="usage.html#configuration">Configuration</a></li>
<li class="toctree-l1"><a class="reference internal" href="api.html">CodeCarbon API</a></li>
<li class="toctree-l1"><a class="reference internal" href="parameters.html">Parameters</a></li>
<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a></li>
<li class="toctree-l1"><a class="reference internal" href="comet.html">Comet Integration</a></li>
<li class="toctree-l1"><a class="reference internal" href="advanced_installation.html">Advanced Installation</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Logging</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="output.html">Output</a></li>
<li class="toctree-l1"><a class="reference internal" href="to_logger.html">Collecting emissions to a logger</a></li>
<li class="toctree-l1"><a class="reference internal" href="visualize.html">Visualize</a></li>
</ul>

        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="index.html">CodeCarbon</a>
      </nav>

      <div class="wy-nav-content">
        <div class="rst-content">
          <div role="navigation" aria-label="Page navigation">
  <ul class="wy-breadcrumbs">
      <li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
      <li class="breadcrumb-item active">Test of CodeCarbon on Scaleway hardware</li>
      <li class="wy-breadcrumbs-aside">
            <a href="_sources/test_on_scaleway.rst.txt" rel="nofollow"> View page source</a>
      </li>
  </ul>
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
             
  <section id="test-of-codecarbon-on-scaleway-hardware">
<span id="test-on-scaleway"></span><h1>Test of CodeCarbon on Scaleway hardware<a class="headerlink" href="#test-of-codecarbon-on-scaleway-hardware" title="Link to this heading"></a></h1>
<p>We use Scaleway hardware to test CodeCarbon on a real-world scenario. We use the following hardware:</p>
<blockquote>
<div><p>EM-I120E-NVME   AMD EPYC 8024P     64 GB    2 x 960 GB NVMe
EM-B112X-SSD    2 x Intel(R) Xeon(R) CPU E5-2620 v3 &#64; 2.40GHz</p>
</div></blockquote>
<p>85 W TDP for the Intel(R) Xeon(R) CPU E5-2620 v3 &#64; 2.40GHz</p>
<p>Choose Ubuntu as OS because new version of stress-ng is not available on Debian 12 (Bookworm).</p>
<p>Connect to the server:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">ssh ubuntu@51.159.214.207</span>
</pre></div>
</div>
<p>Install and run the test:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">sudo chmod a+r -R /sys/class/powercap/intel-rapl/subsystem/*</span>
<span class="go">sudo apt update &amp;&amp; sudo apt install -y git pipx python3-launchpadlib htop</span>
<span class="go">pipx ensurepath</span>
<span class="go">sudo add-apt-repository -y ppa:colin-king/stress-ng</span>
<span class="go">sudo apt update &amp;&amp; sudo apt install -y stress-ng</span>
<span class="go">export PATH=$PATH:/home/ubuntu/.local/bin</span>
<span class="go">git clone https://github.com/mlco2/codecarbon.git</span>
<span class="go">cd codecarbon</span>
<span class="go">git checkout use-cpu-load</span>
<span class="go">curl -LsSf https://astral.sh/uv/install.sh | sh</span>
<span class="go">uv run python examples/compare_cpu_load_and_RAPL.py</span>
</pre></div>
</div>
<p>To do a full code CPU load, we run the following command:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">stress-ng --cpu 0 --cpu-method matrixprod --metrics-brief --rapl --perf -t 60s</span>
</pre></div>
</div>
<p>Get back the data from the server:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">mkdir -p codecarbon/data/hardware/cpu_load_profiling/E3-1240/</span>
<span class="go">scp ubuntu@51.159.214.207:/home/ubuntu/codecarbon/*.csv codecarbon/data/hardware/cpu_load_profiling/E5-1240/</span>
</pre></div>
</div>
<p>You can now delete the server in the Scaleway console.</p>
<p>For the results, see the notebook XXX.</p>
</section>


           </div>
          </div>
          <footer>

  <hr/>

  <div role="contentinfo">
    <p>&#169; Copyright 2020, BCG GAMMA, Comet.ml, Haverford College, MILA.</p>
  </div>

  Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
    <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
    provided by <a href="https://readthedocs.org">Read the Docs</a>.
   

</footer>
        </div>
      </div>
    </section>
  </div>
  <script>
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script> 

</body>
</html>